7d8d42
@@ -430,7 +430,9 @@
public class FSTableDescriptors implements TableDescriptors {
     FileSystem fs = FSUtils.getCurrentFileSystem(conf);
     FileStatus status = getTableInfoPath(fs, FSUtils.getRootDir(conf), tableName);
     // The below deleteDirectory works for either file or directory.
-    if (fs.exists(status.getPath())) FSUtils.deleteDirectory(fs, status.getPath());
+    if (status != null && fs.exists(status.getPath()))  {
+      FSUtils.deleteDirectory(fs, status.getPath());
+    }
   }
 
   /**
